package com.example.myblogserver.mapper;

import com.example.myblogserver.model.Articles;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ArticlesMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Articles row);

    Articles selectByPrimaryKey(Long id);

    //  根据分类id查询文章
    List<Articles> getArticlesByCategoryId(Long categoryId);

    List<Articles> selectAll();

    int updateByPrimaryKey(Articles row);

    List<Articles> getArticlesByCategoryIdAndPage(Long categoryId, Integer pageSize, Integer currentPage);
}